package com.wogu.hibernatetest;

import java.util.Date;

import org.hibernate.*;
import org.hibernate.cfg.*;

public class Main {

	public static void main(String[] args) throws HibernateException {
		SessionFactory sf = new Configuration().configure().buildSessionFactory();
		Session session = sf.openSession();
		Transaction tx = session.beginTransaction();
		
//		for (int i = 0; i < 200; i++) {
//			Member member = new Member();
//			member.setNick("customer" + i);
//			member.setMoney((float)i);
//			session.save(member);
//		}

		Test test = new Test();
		test.setDateline(new Date());
		session.save(test);
		
		tx.commit();
		session.close();
	}
}